package com.ws.drawingsoftware.entity;

import lombok.*;

/**
 * @author 王硕
 * @version jdk21
 * @className line
 * @description
 * @date 2024/11/11 17:24
 */
@Setter
@Getter
public class Line extends Shape{
    //终点X轴坐标，终点Y轴坐标
    private int endX, endY;
    public void setEndX(int endX) {
        this.endX = endX;
    }

    public void setEndY(int endY) {
        this.endY = endY;
    }
    @Override
    public void draw() {
        System.out.println("线条的X坐标:"+super.getX());
        System.out.println("线条的y坐标:"+super.getX());
        System.out.println("线条的图案颜色:"+super.getColor());
        System.out.println("线条的终点X坐标:"+this.getEndX());
        System.out.println("线条的终点Y坐标:"+this.getEndY());
    }
}
